package com.akjava.lib.android.opengl;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.view.KeyEvent;

public abstract class EventHandleRender implements GLSurfaceView.Renderer {

	protected Context context;
	
	public Context getContext() {
		return context;
	}

	public EventHandleRender(Context context){
		this.context=context;
	}
	
	
	
	public void onKeyDown(int keyCode, KeyEvent event) {
	
	}
	/*
	 public  void actionUp(){
		 actionUp(1);
	 }
	    public  void actionDown(){
	    	actionDown(1);
	    }
	    public  void actionRight(){
	    	actionRight(1);
	    }
	    public  void actionLeft(){
	    	actionLeft(1);
	    }*/
	
    public abstract void actionUp(int value);
    public abstract void actionDown(int value);
    public abstract void actionRight(int value);
    public abstract void actionLeft(int value);
    public abstract void actionCenter();
	
   public abstract boolean onTouchDown(float x,float y);
   public abstract boolean onTouchUp(float x,float y);
    
    public abstract boolean onTouchMove(float x,float y);
    
    
    //
    public void setData(String name,Object object){
    	
    }
    
    public Object getData(String name){
    	return null;
    }

    //do action home
	public boolean isSupportKeyCall() {
		
		return false;
	}

	public void actionKeyCall() {
	
	}

	//Do overwrite if support fling.
	public void onFling(float velocityX, float velocityY, float x, float y,
			float x2, float y2) {
		
	}

	public void onLongPress(float x, float y) {
		
	}
}
